@import url('@/config/custom.less');

.bill {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 90px;
  font-family: WeChatSans-Regular;
  .header {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 90px;
    background-color: @primary;
    color: #fff;
    font-size: 14px;
    padding-left: 10px;
    z-index: 100;

    .type-wrap {
      background-color: lighten(@primary, 4%);
      display: flex;
      justify-content: center;
      align-content: center;
      padding: 6px;
      border: none;
      border-radius: 4px;
      position: relative;
      align-self: baseline;
      color: #fff;
      font-size: 14px;
      .all-type {
        margin-right: 12px;
      }
      .all-type::after {
        content: '';
        position: absolute;
        top: 11px;
        bottom: 12px;
        right: 26px;
        width: 1px;
        background-color: #fff;
      }
    }
    .data-wrap {
      display: flex;
      align-items: center;
      margin-top: 8px;
      font-size: 14px;
      .timeButton {
        display: flex;
        align-items: center;
        min-width: 80px;
        font-size: 14px;
        color: #fff;
        background-color: @primary;
        border: none;
        border-radius: 4px;
        .time {
          // 时间字体无法垂直居中，出此下策
          transform: translateY(1px);
          line-height: 18px;
          :global {
            .rv-icon-n-sort-down {
              margin-left: 2px;
              vertical-align: 0em;
            }
          }
        }
      }
      .expense {
        .one-line-ellipsis();
        margin-right: 10px;
      }
      .income {
        .one-line-ellipsis();
      }
    }
  }
  .content-wrap {
    height: calc(~'(100% - 50px)');
    overflow: hidden;
    overflow-y: scroll;
    background-color: #f5f5f5;
    padding: 8px;
    // 下拉刷新不被遮挡
    :global {
      .za-pull {
        overflow: unset;

        .custom-control {
          display: flex;
          align-items: center;
          padding: 10px 0;
          height: 50px;
          font-size: 14px;
          color: @rv-gray-6;
          .za-activity-indicator {
            svg {
              width: 1em;
              height: 1em;
              transform: translateX(3px);
              // vertical-align: -0.5em;
              fill: currentColor;
              overflow: hidden;
            }
          }
          .za-icon--success {
            margin-right: 4px;
          }
        }
      }
      .za-pull__load {
        height: 100%;
      }
    }
    // .loading {
    //   height: 30px;
    //   font-size: 14px;
    //   color: @rv-gray-6;
    // }
    // .load-complete {
    //   height: 30px;
    //   font-size: 14px;
    //   color: @rv-gray-6;
    // }
  }
  .add-wrap {
    position: fixed;
    right: 20px;
    bottom: 100px;
    padding: 4px 12px;
    height: 42px;
    font-size: 14px;
    border: none;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    color: @primary;
    .add-icon {
      font-size: 24px;
      margin-right: 4px;
    }
    // 相比于 vant，react-vant 的 button__text 没有居中对齐的样式
    :global {
      .rv-button__text {
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }
  }
}
